package com.shiguiwu.springboot3.java17;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;

/**
 * @description: 测试类
 * @author: stone
 * @date: Created by 2023/7/16 12:51
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springboot3.java17
 */
@Slf4j
public class Java17Tests {

    /**
     * 记录类
     */
    @Test
    public void testRecord() {
        UserDTO sa = new UserDTO("aa", 12);


        Integer age = sa.age();

        log.error("记录类 ===> {}", age);

        DemoDTO dto = new DemoDTO(sa, "aaa");

        String ni = dto.ni();
    }



    public record UserDTO(String name, Integer age) {
    }
}
